updated spatial query