make result table sorted