implement header storage. testing needed