Added feedforward function