this would probably work technically, but semantically the visitedLevels shouldn't be a static field, but specific to an instantiation.