refactoring (list -> map) in optional header