implemented a segment chain data structure, it eats and slides