add segment

cc @calvinfo