added script file and altered main.cpp