a few mods to the JS