As modified for Edge by ssanchez