added another call to printSegments to ensure segments are getting
updated properly