works on implementing unionBag 3/4