add func sample