added basic sorting to the summary tables