Changed the class structure