updated location query