refactoring out redundant classes