refactoring abstract classes