docs
cleanup
added divide by zero handling