adds more documentation and fixes a bug