main class corrected