new solution, plus minor improvement to readability of eu001