take query function out
enquire function removed retrn breaks to ems