added flatten_Header