some B tree code