builds up thedocal/index