changed the q variable to query and fixed comments.