update map and dict