removed some debugging code.  reduce computation of E.