Modified S3.rb