prepare before distribution