eulerian path optimised (needs a check)