Sorting data in B-Tree structure