Adding code for t, A, d