improve APIApabi with handler & finish borrow logic