prepare reduce