Add methods for determining value of query