matrix sorter not sorting each individual row. out of time :(