code restruct and add T sub catalog checkcase