improve header generator