some extensions for emf code enhancement