move transforming_source to a separate header