add recurrence functions on section 3