refactor modules