changed map to array of unique_ptrs