mjs-each rewrite