added a tree table like sort algorithm on table columns