changed map to array, improved access mechanism