nothing directly uses the state numbers, let the enum handle the values.
apparently enums only behave correctly within header files
manage state transitions more explicitly