implemented circular list container to optimize implementation of ear-clipping