Edited makeCacheMatrix function