Pass state name to transition function