initial code for EM-shift algorithm; still need code to test ellipse region presence