adding for loop to fix it