add wrapper code to call ECOS