implemented training based on all the data and testing by typing in responses to traverse the tree