Ajout main loop