Modified makeCacheMatrix() and cacheSolve()