refactoring as a common lib
common lib in ints own place