convert has_key to X in dictionary