added a bunch of documentation