library.py with some changes