add library and revised test