Adding sorting to HTML summary table