Refactored interactive input method into private methods