fixed the errors with my syntax, seems to be working well