example modified, bug in class led corrected