moved the clear statement to before calling locationQuery