adding for loop