corrected example based on Scott's comments. I hope this is correct now :-)