add const before std::map<int, int> lmap as in the class API and add & for lmap