adding feed forward function with reduction