should use proper widgets and an explicit state machine