entrySet() rather than keySet() in some cases.