[bw] created a basic tree with naive sorting