atlas testing algrithm (not finished)