Unit Test Added

+refactoring