fixed bugs, now able to run 10 fold test in seconds