refactoring my classes