improved example slightly