added option to select the generated part.