wired up _conditions and _query methods to read and added test cases