almost
maybe I need to limit the subdivision of segments