added a set_input function