fixed problem with map: move struct definition outside main