binary tree now working for all platforms, ready to benchmark