What's wrong with my permutation logic? The given question:

In how many ways the letters of the word RAINBOW be arranged, such that A is always before I and I is always before O.

I gave it a try and thought below:

Letters A, I and O should appear in that order. Then there are four places in which all the remaining four letters can appear. It means there are a total of 16 places: $$*_1*_2*_3*_4\quad A\quad*_5*_6*_7*_8\quad I\quad*_9*_{10}*_{11}*_{12}\quad O \quad *_{13}*_{14}*_{15}*_{16}$$ 
  Out of these 16 places remaining, the letter can appear in any of the 4 places, giving total $^{16}P_4 = 43680$ possible arrangements. 

But the given answer is just 840 with following explanation:

All the 7 letters of the word RAINBOW can be arranged in 7! ways and 3 particular letters (A,I,O) can be arranged in 3! ways. But the given condition is satisfied by only 1 out of 6 ways. Hence required number of arrangements 
  $$=\frac{7!}{3!} = 840$$

So what's wrong with my logic? I must be counting certain arrangements multiple times or my logic must be at fault in large. But what's that exactly?

I got the answer above, but when I tried to solve the same problem I applied slightly different thinking to same solution.  Thus sharing it here.
The book says:

All the 7 letters of the word RAINBOW can be arranged in 7! ways and 3 particular letters (A,I,O) can be arranged in 3! ways. But the given condition is satisfied by only 1 out of 6 ways. Hence required number of arrangements 
  $$=\frac{7!}{3!} = 840$$

We can also think it as follows:

There are 7 letters in $RAINBOW$. Out which 3 are A, I and O, in that order (i.e. they cannot be in any other order I, A and O). So they can be at any of $\binom{7}{3}$ positions. Now remaining 4 letters are $R,N,B$ and $W$, in any order, so they take $4P_4$ positions. The total is
  $$\binom{7}{3}\times4P_4=\frac{7!}{4!\times3!}\times4!=\frac{7!}{3!}$$

Just a little bit of different thinking.
