enable replacing parts of the pattern other than the leafs