another slight refactor of the class walking