add query within 1km function