add a powerline segment function