example use map as struct