Rewrite the module pattern