Modified JS. Still not tested, changing machines