improved exception passing