I\'m trying to get the below function to work using s3 class. It is working when I dont add the class dimension and run each part seperately but when I add the class command