put the dispatcher in a separate loop