revised and added dict intersect snippet