changed parallel arrays to maps