added functionality for result to be displayed in text box itself.