modified the way how input and output names are generated