solved illegal division by zero