issues with class structure