added sorting to table columns