finish the query1