Added the sampling phase.