Improved codata program