update module (refactoring)