Updated cacheMatrix.R from swu