add sample function