swapping table to bin-tree in sample
fix memory error in bin-tree