reducer performs reduce