added indexer and examples from re-write branch