cloned from https://github.com/cgiovanacci/recurrence