finished swapping endianness of header on read