separating classes & refactoring