refactored the querCompiler & the resource object