keyup function as well as NEXT button