improving script from class015 to check class017/homework1