Segment generation and cycle loop generated

Segment assignment still somehow improper syntax