Added logic for displaying state number on tree