Add previous loop. Next step is to do it with Node.