003 refactor module logic