working version of fly ellipse fitting