added ability to transform SRO before it gets written