added threaded indexing