advanced with class structure