fixing example code