simulation of three set operation