add support for indexed attributes. closes #4