clone method for z3