todo leaf remove and merge