make list sorted first by status and then lexicographically