RBM update: added 30000 threshold to quit even if the threshold is not
satisfied