added total processed check