add indexing prototype