Added methods for printing out tree