update syntax. more refactoring needs to be done