Added an option to limit the number of commands by choosing a random subset