first steps in refactoring to a module