changed set operations to leyks implementation