updated query function