restructuring into modules