fixed function calss in lib.py