WriteClassDetail func. edited