sample library function