made regenerate DRY