implementing indices