new routine to make debugging easier
more diagnostics - I think the problem is in padding denominator with 1e-10