Update cacheSolve function