Intial script from Coursera.