could we use a map instead of an array?