The purpose of the for loop is unclear. Please explain what you're doing there.