added processing input and displaying the result