refactored Telegram Code to use State Design Pattern for user input.