since map is already a const reference,  there is no harm 
to store comperator also as const reference.