first pass at new ear clip algorithm