debugging the problem of diverging in computation