Added cacheSolve function.