added class definition and declaration