added xml stuff: header generation