Adding the ability to merge terms