finalize main header