Programming Assignment 2 : Updated functions
Programming Assignment 2 : Latest function with comments