added a patched regulate.js