refactoring to two classes that have more intention