Implement using trng. Still not tested