little bit of state checking and basic animation