moved some of the functionality into ECO.pm