fixed the example code