rewrite bodule engine