added result function to get winner