Example code improved.