change 'dict' to 'key' for correctness