changed class structure