Changed funtion name back to include EMD