refactorizing to have a thiner object