Updated sample program to include recurrences