added indexing of media