fixed syntax, remove duplicate query