removed debug and delay from simple main loop