mostly complete header code