first structure for a basic statemachine.