Changed enumerate to a for range() loop to save time
Reverse loop