added header detection + test