use map instead of multimap & fix compiler errors