Add functions to deal with recurrences