Fixed unsaved changes made

Added the for loops again.