refactored jcr query builder