Update result function