Added copy function for prng