Redid the S3 script