update EM acceleration code and tests