Corrected the class structure