added examples that throw exceptions