catches exception, better documenting, better handling of progress bar