add a clearInput function to clean the input, unlink function is added