modifyed smlreader and ei