adjusted to new structure of headers