example code modified.