fixed threshold in 2nd calc to reduce using 3rd round when not needed
better error calcs and a bug fix