code to make combined reply and rt tree