removed median point from kd tree. back to using SAH