added a whole bunch of documentation