fix example code to match interface