added trim() call to key in addToKVSList to prevent keys with extra characters