created code2 from ec