added kd-tree structure