Implemented the Simple Query API