add init and destroy header function