modify  player state machine design