tweaked example script and added comments