adding to query