made index a bit more elaborate