convert FSM to use IntEnum 
convert code to use async
