updateResultText method added