add function to merge Transitions