State machine diagram