change getElementById to also print child index path