removes Loops