implement euler tour