Refactoring
Added simple unit test