added ems functionallity