removed broken algorithms, prepared code for segment intersection assignment