added treatment of extended code