f_input function is added.