edit second query