added support for $index, and $text operators