How to compare dictionary elements to another dictionary?