fixed off by one for recurrences