Rewrite with if operator for sorting exceptional headers..