modify cds function.