class definition fixed