complete rewrite the module