corrected example code