updated source.  Exception handling added.  new comments