change for loop calls to match output