query methods written, not tested