updated library and modified example