adding new functions and correcting documentation