rename aMap to tempMap