add header and format long opts