Improve the Query interface