Replacing the useless map by an array