one more try on mainloop