first attempt at ema