adding finished code to kvstore