Changed class script to meet the new requirements