add sample program using composite function