The effect of nature and location of defects on bandgap narrowing in black TiO2 nanoparticles