added config file, and user input validation