preliminary DTF function