KV example code