Addded function 'ds.createfactor'