Add function to convert data info to structure