change to perl s3 script instead