finally version

Refactoring is done.