added sorting to the table. (column names clickable with an arrow icon)