parsing the endings file