add value and indexing patch