replaced arraylist with maphache