Adding custom query support.