Use entrySet() instead of keySet(), since it's more efficient