added whole script