Show that $E[\sum_{i=1}^{N}X_i] =E(N)E(X_1)$ 
Let $(X_n)$ be a sequence of random variables that are independent and identically distributed, with $EX_n < \infty$ and $EX_n^2 < \infty$. Let N be a random variable with range $R \subseteq \Bbb{N}$, independent of $(X_n)$, with $EN < \infty$ and $EN^2 < \infty$. Show that $E[\sum_{i=1}^{N}X_i] =E(N)E(X_1)$

So, I tried to calculate $E(\sum_{i=1}^{N}X_i|N)$. I think that it might be $E(X_1)N$, so, I tried to show that $E[t(N)\sum_{i=1}^{N}X_i]=E[NE(X_1)t(N)]$ for all t which are bounded and Borel-measurable, but I don't know how to calculate $E[t(N)\sum_{i=1}^{N}X_i]$. Any hint?

Hint:
$$E \left [ \sum_{i=1}^N X_i \right ] = \sum_{n=1}^\infty E \left [ \left. \sum_{i=1}^N X_i \right | N=n \right ] P(N=n) \\
= \sum_{n=1}^\infty \sum_{i=1}^n E[X_i|N=n] P(N=n).$$
Can you compute the inner expectation?
