refactor system module