updated modification for extra classes