polish ecdf code