added update
added indexing