updating the cachematrix.R for the solution