clarify main loop and repetitive callbacks