the inheritance is all wrong but whatever
refactoring, sorting out some inheritance issues