State Machine Design Procedure