CHANGED simplified header parsing