FIX: Export fsm function