added mutators to Segment class