A program for ec