adding segment array to nodes