safer es queries