added SD ellipse funcionality. Distance calculation is still wierd.