Sample implementation of Local State using Automaton