transform refactoring