Add ManagerQuery function