add attribute query function