lib doc and test