break down functions over nested structs