Changed Set<Map.Entry> to Collection