coorect use of queryByHook and queryAll