Changed the pattern of map for performance reasons