added more documentation
more fault tolerance