LoopExit  global var is added. int loop() changed to void loo()