added some stuff to index handler