Updated to include length in header