refactoring
unit test. start.