change mapped segment interface to keep sets instead of vectors