preparing dom map