Add a virtual main loop