The map::at method does not always exist, so instead use map::find.