fixing sorting, adding outputsList()