common refactoring
Merge pull request #2 from hemiSRT8/common-refactoring

Common refactoring