revert usage of  header and better detect data keys