This is the solution for Programming Assignment 2 v1