Updated variables in connecting loop