added solution to cachematrix.R