edited cachematrix.R and added the solution to the assignment