cleaned up, broke out error estimates into their own functions