Solved the sorting/sample set problem. 100%. Around 6 seconds.