getting the header at the right place