Created Data State Machine, haven't debugged yet