update example code