Stucture of the Result

Check the structure type and initialize the finction according to that