Replaced old input method with the readline function