can you try to merge this with the existing transformer and see if it results in a cleaner code.