[refactoring] replaced singular transform methods by a generic method