add smoothstate js