use map to support old gcc