updated for loop @ line 24