adding new functions and documentation