add prefop query function