fixed switch, __init__ now has missing self, inheritance correctly calls State instead of state.State