You’ll need to show more of your code. In theory what you posted should be fine.