refactor common module