added label generation and output on assembling