feature: add query function