Added button read out to the main loop