Create main_with_generate