refactoring and work on transformations composed with sums