random_int function implemented