put dtau in a function