checked, basic clean version of wEM for AS