modify the function,not use readline again

modify the function,not use readline again. This function will not
affect the system as before