Replaced another for in loop with a for loop.