added random verifying
Fixed randomness by deep cloning