s3 reference code added