private boolean Estep(double[] Pz, double[][] Pd_z, double[][] Pw_z, double[][][] Pz_dw)
    {
    	for (int m = 0; m < this.M; m++)
        {
    		Data data = this.dataset.getDataAt(m);
            for (int position = 0; position < data.size(); position++)
            {
            	// get word(dimension) at current position of document m
                int w = data.getFeatureAt(position).dim;

                double norm = 0.0;
                for (int z = 0; z < this.K; z++)
                {
                	double val = Pz[z] * Pd_z[z][m] * Pw_z[z][w];
                    Pz_dw[z][m][position] = val;
                    norm += val;
                }

                // normalization
                for (int z = 0; z < this.K; z++)
                {
                	Pz_dw[z][m][position] /= norm;
                }
            }
        }
        return true;
    }