reorganize inversion handling; sort _tsolve results