simplified query interface, added more docs