change query to handle camera scaling