shouldn't this include a check for the class being in the global namespace ?