update lib and sample