adding new functions and improving old ones