finished em algorithm
still some bug there
fixed all bugs