1) change repeatability algorithm
2) minor changes