use get_random_int() to fix entropy depleting