rewrite to move basemodules to a second module