Updated Query API