Updated display method in Data component

to return a sorted ArrayList to the UI