use map instead of array for keys