added zero check for dividend