split to library and exsample