update logic for mapping NSDictionary.