In this script, it doesn't remove class after action1 takes place
After running action2 and removing the action2's class, the action1 will start again. This is undesirable effect and needs a solution
It looks like you have to design it in such a way that you can always remove the class after the animation