loop control by more than one variables