fixes class structure