update to query