Changed ArrayList to HashMap