implemented union, inters and butlast