FIX: modulo RAND_R_MAX+1