partial implementation of segments