improved randomValues pattern