added a bit of documentation to new functions
slight changes