added basic header parsing