finish lib and demo