version with function references in structs with return values.