back to naive header detection and partioning, more unit tests next