discrete rv generation