try to solve the null pointer exception in EMA