Added handler for when the user types and the retrieveResult function

Added handler for when the user types and the retrieveResult function

issue A24Group/Triage#2401