finish the borrow function