use key-values correctly for keys