move common methods to new module