sorting parties by elected candidates, fixes #68