Added ordinal numbers logic to loop