added script code and setup