added check for zero