moves the output loop from the ui into the logic