update index functionality