handling header size and stuff