Added regenerate option