refactor module method