Tolerance fixed: it is now 5*std_dev
Referencing default branch in the repository forked by milakov
sort_by_key is replaced by sort