add query method