sort working. tree still segfaulting.