removed query function