fixed the broken header cookies and implemented the 'old' hashmap method