Added the validation of input string and also provided an option to enter continuous inputs from client