added throw and catch to short circuit reduction