New chapter4 codes