mods made to code and script to get it running