add rigorous checking in the case a zero is detected