updated library and test cases