Changed loops to not use keywords.