putting a for loop in a for loop. Haven't thought this through