added full script and fixed indent