update makeCacheMatrix and cacheSolve function