Added custom query builder