sort by severity then time