generic header loading method