add replace player at index functionality