improved sig of addKeyValue