functional style struct update