first working version of 'emc'