Placed solution in cachematrix.R