fixed bug: p_d_z array was too big! and I was initializing the prob
arrays twice.