restored index, added smoothState.