use chain in class Code