modify the underlineMove function in order to make the underline move smoothly