extract header rules
extract footer rules