add function sample