refactor SWModule