adding structures to handle EMF device context