modify example code