wrap new class check around main function