fixed first loop