merge handles loops