error in class structure