added functionalities to kd-tree: writing kd-tree nodes data and tracking of unfruitful opened nodes