add sample algorithm