This is as per assignment number 1 of coursera