add query mode