rewrite module system again