replace an emptyArray and computeIfAbsent instead