use dict comprehension for making IP dict