added support for indexes