Add generation callback