getFinalState