added kd-tree back in main