generalizing the epoch length