more recurrence logic