adding custom excepting functionality