properly wrapping reduce func params