enhance checkout, add CheckoutTree method