renamed fromState and toState