changed try/catch to throw