modify function and UI of input second