refactoring => remove magic numbers
Merge branch 'simple_automaton'