Small changes to query1