exceptions handling rebuilt