kd-tree building works now but is very slow