updated exceprt logic