Add like and unlike terms