changing main frame loop
...