split out the priority normalization logic (fixes #11)