handle animations with Finate State Machine