update lib and add test template