Optimizations - don't check the dictionary twice.