Added the view for the sorted list and updated the sorted array