refactor:Move Acc to State and use subclass to remove if.