refactor StepFunction and Transformer