refactoring codes in cst.