replace result hash with a struc