Completed up to Reduce phase for entropy calculation.