messed up a for loop with indentation