add precondition to random bytes