updated discretedistribution training