start of index handler