added global variables to use s3