first, finished version of kv store