added customizable reducer