Dp 3122

We should also think about new tests for this changes. Before merging please contact with me.
get the key from dict