Updated Script with comments