added comments to perl script