stricter sorting to enable output comparison
fixed cases where N not applicable (Cairina moschata)