added ecm, currently slow