made Stateomat::state_is_accepting use switch case