wrote queries