cacheMatrix.R updated with solution