added td derivation