perf upgrades, fixing bug in algo. should pull in all difficulty data from the doc