I am having trouble solving the following task:

> 
> Given is the language $$D=\{ \langle M, w \rangle \mid \text{$M$ is a Turing machine and $M$ enters all states on input $w$}\}$$
> 
> 
> Prove that $D$ is not decidable by reducing $$A\_{\mathrm{TM}}=\{\langle T, w \rangle \mid \text{$T$ is a Turing machine and $T$ accepts $w$}\}$$ to $D$.
> 
> 
> 

My solution and proof idea
--------------------------

(I am not sure if they are correct.) Assume that $D$ is decidable. Let $R$ be a decider for $D$ and $S$ for $A\_{\mathrm{TM}}$. We know that $A\_{\mathrm{TM}}$ is not decidable. However, if we manage to show it is decidable using $R$ as subroutine, we derive a contradiction and have therefore shown that $R$ is not decidable either.

Now I have got to a point where I do not know further because I have problems finding ways of showig the contradiction since I cannot see a connection between entering all states and accepting input $w$. If the TM enters all states, it is still unclear if the input is also accepted.

I guess I have to run R on a modification of $T$ so that I can derive a contradiction.