Rebuilt result function