list comp and init

change some for loop to list comprehension
change Dict's initializing with tuple to dict initializing style