moved calling EM engine logic to corresponding source file