add getInputMessage into code