added comments + possibility to set the NUM_OF_IND

NUM_OF_IND can now be set as first parameter.
also added a new abort condition