added animation to states