switch key and value