added code to display KD Tree