added smoothstate not really working