Added comments on code with minor explanation about the origin of code and my contribution (if any)