now works with the new interface of class Index