updated location query, now grouped