refactor module.inc