Submitted patch for B-Tree support