Actually there is a duplication inside the generator loop and for the last command. We could factorize this
Actually there is a duplication inside the generator loop and for the last command.
We could factorize this