error catching of sum mod size