refactoring common module