Updated the makeCacheMatrix method