update documentation, add throw option