correct transition refactor