added ember code from NEEM | need more corrections