updated cachematrix code for assignment 2 with completed comments