change query to insert