implement basic query mechanisms