Added attempt() function and updated documentation.