added support for indices