interim commit for fixing the firing conditions
continued work on generator for segments
corrected merge conflict