Edited solution to cachematrix.R