fixed computing samples ordering