refactor list to allow proper sorting with multiple columns