successful test with new main loop