added staging code and s3 compatibility