adapted to new version of dc factory