adding nn input function