Sorting and appending here