implemented folding bodies and headers