key/values refactoring