improving the API related to Query classes