improved insertion order analysis scripts