switched kvstore to use int as keys rather than byte[]