optimized createModule